package cn.yeamin.spring.boot.dao;


import cn.yeamin.spring.boot.vo.Girl;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;

/**
 * Created by Administrator on 2017/5/9.
 */
public interface GirlRepository extends JpaRepository<Girl, Integer> {

    public Girl findByCity(String city);

    //@Qualifier //这个注解可以写在@Query上面,里面SQL语句可写更新操作
    @Query("select girl from Girl girl where age = ?1")
    public Girl queryAge(Integer age);


}
